﻿using System;
using System.IO;
using Ganosoft.Aspect;
using Ganosoft.Container;

namespace GanoESB.Business
{
    public class ServerLoader
    {
        [Bean]
        protected Server server;

        public Server GetServer()
        {
            IContainer container = AspectContainer.Instance;
            container.Configure(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "server.config"));
            container.Inject(this);

            return server;
        }
    }
}
